bbsApp.filter('stringToShort',function(){
	//<span ng-bind="member.memberLv |stringToShort">
    return function(longStr){
        if(longStr != null && longStr.length > 15){
            return longStr.substring(0, 15) + "...";
        }
        else{
            return longStr;
        }
    }
})
.filter('numToText',function(){
	//<span ng-bind="member.memberType | numToText:memberTypeArray"></span>
    return function(input,optionArray){
    	if(input===undefined){
    		return;
    	}
    	if(optionArray  == "undefined" || optionArray.length==0 || optionArray == null){
    		return input;
    	} else {
    		for(var i=0;i<optionArray.length;i++){
    			if((optionArray[i].value!='' || optionArray[i].value===0) && optionArray[i].value==input){
					return optionArray[i].text;
				}
    		}
    	}
    }
});